fix(resource): prevent permission-gated breadcrumb items from flashing on load#4732
Conversation
…undant description suffix - Fix icon colors to use --text-icon token across connector cards and modal - Switch Reconnect/Update access buttons from active to primary variant - Lift search box surface from --surface-2 to --surface-3 so it's visible against modal bg - Replace raw <button> elements with emcn Button in base.tsx - Shrink Connected Sources modal from lg to md - Strip " to/into/from your knowledge base" from all 27 connector descriptions to prevent overflow
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Also tightens Reviewed by Cursor Bugbot for commit b96b7e7. Configure here. |
Greptile SummaryThis PR eliminates the permission-gated breadcrumb flash by keeping dropdown items in the DOM during the session/permission hydration window (rendered as
Confidence Score: 5/5Safe to merge — the changes are narrowly scoped to loading-state guards and The core hook change correctly composes two independent loading flags, the No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Page
participant useUserPermissions
participant useSession
participant Breadcrumb
Page->>useUserPermissions: call(workspacePermissions, permissionsLoading)
useSession-->>useUserPermissions: "{ data: null, isPending: true }"
useUserPermissions-->>Page: "{ isLoading: true, canEdit: false }"
Page->>Breadcrumb: "dropdownItems with disabled=true (items visible but inert)"
Note over useSession: Session resolves
useSession-->>useUserPermissions: "{ data: { user: { email } }, isPending: false }"
useUserPermissions-->>Page: "{ isLoading: false, canEdit: true/false }"
alt "canEdit = true"
Page->>Breadcrumb: "dropdownItems with disabled=false (items become clickable)"
else "canEdit = false"
Page->>Breadcrumb: "dropdownItems=[] (items removed, no prior flash)"
end
Reviews (2): Last reviewed commit: "fix(resource): self-remove keydown liste..." | Re-trigger Greptile |
…sion loading in isLoading guard
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit b96b7e7. Configure here.
Summary
Type of Change
Testing
Tested manually
Checklist